package com.woniu.darryringmall.front.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.woniu.darryringmall.front.entity.Goods;
import com.woniu.darryringmall.front.entity.ViewGoods;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ViewGoodsMapper extends BaseMapper<ViewGoods> {
    @Select("select * from mall_view_goods where gid=#{gid} order by price asc")
    List<ViewGoods> getByPrice(int gid);

    @Select("select g.* from mall_goods g,mall_category y where y.id=g.categoryId and y.type=#{type}")
    List<Goods> getByType(String type);

}
